package org.agile2soft.nexoma.expedient.entities;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
@SuppressWarnings({"serial"})
public class ExpedientTypePhaseId implements java.io.Serializable {

    private Integer phaseId;
    private Integer expedientTypeId;

    public ExpedientTypePhaseId() {
    }

    public ExpedientTypePhaseId(Integer phaseId, Integer expedientTypeId) {
        this.phaseId = phaseId;
        this.expedientTypeId = expedientTypeId;
    }

    @Column(name = "FAS_ID", nullable = false)
    public Integer getPhaseId() {
        return this.phaseId;
    }

    public void setPhaseId(Integer phaseId) {
        this.phaseId = phaseId;
    }

    @Column(name = "TEX_ID", nullable = false)
    public Integer getExpedientTypeId() {
        return this.expedientTypeId;
    }

    public void setExpedientTypeId(Integer expedientTypeId) {
        this.expedientTypeId = expedientTypeId;
    }

    public boolean equals(Object other) {
        if ((this == other))
            return true;
        if ((other == null))
            return false;
        if (!(other instanceof ExpedientTypePhaseId))
            return false;
        ExpedientTypePhaseId castOther = (ExpedientTypePhaseId) other;

        return (this.getPhaseId() == castOther.getPhaseId())
                && (this.getExpedientTypeId() == castOther.getExpedientTypeId());
    }

    public int hashCode() {
        int result = 17;

        result = 37 * result + this.getPhaseId();
        result = 37 * result + this.getExpedientTypeId();
        return result;
    }

}
